﻿using System.ComponentModel.DataAnnotations;

namespace FirstWebAPI.Models
{
    public record Blog
    {
        [Display(Name = "博客标题")]
        [Length(2, 300, ErrorMessage = "{0}长度需要在{1}-{2}")]
        public required string Title { get; set; }
        public string? Description { get; set; }
        [MaxLength(1000)]
        public required string Content { get; set; }
        public DateTimeOffset CreatedTime { get; set; }
    }
}
